#version 430

in vec3 p3d_Normal;
in vec4 p3d_Vertex;
in vec4 p3d_Color;
in vec2 p3d_MultiTexCoord0;



uniform mat4 p3d_ModelMatrix;
uniform mat4 p3d_ModelViewMatrix;
uniform mat4 p3d_ModelViewProjectionMatrix;



out vec3 normal;
out vec4 position;
out vec3 eye_normal;
out vec4 eye_position;
out vec4 color;
out vec2 tex_coord;

void main()
{
    gl_Position = p3d_ModelViewProjectionMatrix * p3d_Vertex;
    position = p3d_ModelMatrix * p3d_Vertex;
    normal = normalize(mat3(p3d_ModelMatrix) * p3d_Normal);
    eye_position = p3d_ModelViewMatrix * p3d_Vertex;
    eye_normal = normalize(mat3(p3d_ModelViewMatrix) * p3d_Normal);
    color = p3d_Color;
    tex_coord = p3d_MultiTexCoord0;
}
